package com.ruoyi.project.product.specification.mapper;

import com.ruoyi.project.product.specification.domain.Specification;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SpecificationMapper {

    /**
     * 规格查询
     * @param specification
     * @return
     */
    public List<Specification> selectSpecificationList(Specification specification);

    /**
     * 规格新增
     * @param specification
     * @return
     */
    public int insertSpecification(Specification specification);

    /**
     * 根据id查询规格
     * @param specificationId
     * @return
     */
    public Specification selectSpecificationById(Long specificationId);

    /**
     * 规格修改
     * @param specification
     * @return
     */
    public int updateSpecification(Specification specification);

    /**
     * 规格批量删除操作
     * @param ids
     * @return
     * @throws Exception
     */
    public int deleteSpecificationByIds(Long[] ids) throws Exception;


    /**
     * 校验产品名称是否存在
     * @param specificationName
     * @return
     */
    public Specification checkSpecificationNameUnique(String specificationName);
}
